{% extends 'home.html' %}

{% block content %}
<form name="form" method="post" id="form">
    <div class="c-layout-page">
        <div class="c-content-box c-size-md c-bg-white">
            <div class="container">
                <div class="panel panel-primary">
                    <div class="panel-heading">仪器基础信息输入</div>
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-md-12">
                                <table class="table">
                                    <tbody>
                                        <tr>
                                            <th scope="row" style="text-align:center">仪器名</th>
                                            <td colspan="2"><input name="A1PH_Name01" type="text" value="卡尔费休容量法水分测定仪"
                                                    id="A1PH_Name01" style="height:25px;width:300px"></td>
                                            <th style="text-align:center">仪器接收编号</th>
                                            <td colspan="2"><input name="A1PH_Received02" type="text"
                                                    value="{{ A1PH_Received02 }}" readonly="readonly"
                                                    id="A1PH_Received02"
                                                    style="background-color:#F3F3F3;height:25px; width:260px">
                                            </td>
                                        </tr>

                                        <tr>
                                            <th scope="row" style="text-align:center">型号/规格</th>
                                            <td><input name="A1PH_ProdModel03" type="text" id="A1PH_ProdModel03"
                                                    style="height:25px;width:240px"></td>
                                            <th style="text-align:center">仪器序列号</th>
                                            <td><input name="A1PH_SN04" type="text" id="A1PH_SN04" style="height:25px">
                                            </td>
                                            <!-- ... existing code ... -->
                                            <th style="text-align:center">环境条件</th>
                                            <td>
                                                <input name="A1PH_Wd11" type="text" id="A1PH_Wd11"
                                                    style="height:25px; width:50px"
                                                    onblur="formatToOneDecimal(this)">&nbsp;°C &nbsp;&nbsp;
                                                <input name="A1PH_Sd12" type="text" id="A1PH_Sd12"
                                                    style="height:25px; width:50px"
                                                    onblur="formatToOneDecimal(this)">&nbsp;%RH
                                                <script>
                                                    function formatToOneDecimal(inputElement) {
                                                        if (inputElement.value !== '') {
                                                            const value = parseFloat(inputElement.value);
                                                            if (!isNaN(value)) {
                                                                inputElement.value = value.toFixed(1);
                                                            }
                                                        }
                                                    }

                                                    // 页面加载时也格式化已有的值
                                                    document.addEventListener('DOMContentLoaded', function () {
                                                        formatToOneDecimal(document.getElementById('A1PH_Wd11'));
                                                        formatToOneDecimal(document.getElementById('A1PH_Sd12'));
                                                    });
                                                </script>
                                            </td>
                                            <!-- ... existing code ... -->
                                        </tr>
                                        <tr>
                                            <th style="text-align:center" scope="row">校准依据</th>
                                            <td colspan="3"><input name="A1PH_Xz06" type="text" value="JJG1154-2018"
                                                    id="A1PH_Xz06" style="height:25px;width:420px"></td>
                                            <th style="text-align:center">校准日期</th>
                                            <td><input name="A1PH_Rq07" type="text" value="{{ date }}" id="A1PH_Rq07"
                                                    style="height:25px"></td>
                                        </tr>

                                        <tr>
                                            <td colspan="6"
                                                style="height:20px;text-align:center;background-color:aliceblue">
                                                标准器及配套设备
                                            </td>
                                        </tr>

                                        <tr>
                                            <td colspan="6">
                                                <table class="table" id="tools">
                                                    <tbody>
                                                        <tr>
                                                            <th style="text-align:center">名称/型号</th>
                                                            <th style="text-align:center">编号</th>
                                                            <th style="text-align:center">测量范围</th>
                                                            <th style="text-align:center">批号/证书编号</th>
                                                            <th style="text-align:center">有效期</th>
                                                            <th style="text-align:center">校准机构</th>
                                                            <th style="text-align:center">计量特性</th>
                                                        </tr>
                                                        <tr>
                                                            <td><input name="BLPH_Xmxh16" type="text" id="BLPH_Xmxh16"
                                                                    style="height:25px"></td>
                                                            <td><select name="BLPH_Bh17" id="mySelect"
                                                                    style="height:30px;width:107px;">
                                                                    <option value="0" selected="selected">==请选择==
                                                                    </option>
                                                                    <option value="34828">34828</option>
                                                                    <option value="GBW13513">GBW13513</option>

                                                                </select></td>
                                                            <td><input name="BLPH_FW_01" type="text" id="BLPH_FW_01"
                                                                    style="height:25px;width:60px"></td>
                                                            <td><input name="BLPH_Jlzsbh18" type="text"
                                                                    id="BLPH_Jlzsbh18" style="height:25px"></td>
                                                            <td><input name="BLPH_Yxrq19" type="text" id="BLPH_Yxrq19"
                                                                    style="height:25px"></td>
                                                            <td><input name="BLPH_Yzjg20" type="text" id="BLPH_Yzjg20"
                                                                    style="height:25px;width:100px">
                                                            </td>
                                                            <td><input name="BLPH_Zqddj21" type="text" id="BLPH_Zqddj21"
                                                                    style="height:25px; width:140px"></td>

                                                        </tr>
                                                        <tr>
                                                            <td><input name="BLPH_Xmxh22" type="text" value="/"
                                                                    id="BLPH_Xmxh22" style="height:25px"></td>
                                                            <td><select name="BLPH_Bh23" id="mySelect"
                                                                    style="height:30px;width:107px;">
                                                                    <option value="0" selected="selected">==请选择==
                                                                    </option>
                                                                    <option value="34828">34828</option>
                                                                    <option value="GBW13513">GBW13513</option>

                                                                </select></td>
                                                            <td><input name="BLPH_FW_02" type="text" value="/"
                                                                    id="BLPH_FW_02" style="height:25px;width:60px"></td>
                                                            <td><input name="BLPH_Jlzsbh24" type="text" value="/"
                                                                    id="BLPH_Jlzsbh24" style="height:25px"></td>
                                                            <td><input name="BLPH_Yxrq25" type="text" value="/"
                                                                    id="BLPH_Yxrq25" style="height:25px"></td>
                                                            <td><input name="BLPH_Yzjg26" type="text" value="/"
                                                                    id="BLPH_Yzjg26" style="height:25px;width:100px">
                                                            </td>
                                                            <td><input name="BLPH_Zqddj27" type="text" value="/"
                                                                    id="BLPH_Zqddj27" style="width:140px;height:25px">
                                                            </td>

                                                        </tr>
                                                        <tr>
                                                            <td><input name="BLPH_Xmxh28" type="text" value="/"
                                                                    id="BLPH_Xmxh28" style="height:25px"></td>
                                                            <td><select name="BLPH_Bh29" id="mySelect"
                                                                    style="height:30px;width:107px;">
                                                                    <option value="0" selected="selected">==请选择==
                                                                    </option>
                                                                    <option value="34828">34828</option>
                                                                    <option value="GBW13513">GBW13513</option>

                                                                </select></td>
                                                            <td><input name="BLPH_FW_03" type="text" value="/"
                                                                    id="BLPH_FW_03" style="height:25px;width:60px"></td>
                                                            <td><input name="BLPH_Jlzsbh30" type="text" value="/"
                                                                    id="BLPH_Jlzsbh30" style="height:25px"></td>
                                                            <td><input name="BLPH_Yxrq31" type="text" value="/"
                                                                    id="BLPH_Yxrq31" style="height:25px"></td>
                                                            <td><input name="BLPH_Yzjg32" type="text" value="/"
                                                                    id="BLPH_Yzjg32" style="height:25px;width:100px">
                                                            </td>
                                                            <td><input name="BLPH_Zqddj33" type="text" value="/"
                                                                    id="BLPH_Zqddj33" style="width:140px;height:25px">
                                                            </td>

                                                        </tr>

                                                        <tr>
                                                            <td>生产厂商</td>
                                                            <td colspan="6"><input name="A1PH_Sccs52" type="text"
                                                                    value="梅特勒托利多" id="A1PH_Sccs52"
                                                                    style="width:900px;height:25px"></td>


                                                        </tr>
                                                        <tr>
                                                            <td>证书单位</td>
                                                            <td colspan="6"><input name="A1PH_Zsdw53" type="text"
                                                                    id="A1PH_Zsdw53" style="width:900px;height:25px">
                                                            </td>


                                                        </tr>
                                                        <tr>
                                                            <td>证书地址</td>
                                                            <td colspan="6"><input name="A1PH_Zsdz54" type="text"
                                                                    id="A1PH_Zsdz54" style="width:900px;height:25px">
                                                            </td>


                                                        </tr>
                                                        <tr>
                                                            <td>校准地点</td>
                                                            <td colspan="6"><input name="A1PH_Xzdd55" type="text"
                                                                    id="A1PH_Xzdd55" style="width:900px;height:25px">
                                                            </td>

                                                        </tr>

                                                    </tbody>
                                                </table>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="panel panel-primary">
                    <div class="panel-heading">
                        1. 通用技术要求
                    </div>
                    <div class="row">
                        <div class="col-xs-3">外观及通电检查：</div>
                        <div colspan="2" class="col-xs-3">符合 <input id="A1PH_Wgjcfh56" type="checkbox"
                                name="A1PH_Wgjcfh56"></div>
                        <div colspan="3" class="col-xs-3">不符合 <input id="A1PH_Wgjcbfh57" type="checkbox"
                                name="A1PH_Wgjcbfh57"></div>
                    </div>
                </div>

                <div class="panel panel-primary">
                    <div class="panel-heading">2.水分含量示值相对误差检定</div>
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-md-12">
                                <table class="table table-condensed">
                                    <tbody>
                                        <tr>
                                            <th style="text-align:center;vertical-align:middle; font-size:13px;">
                                                含水量<br> mg
                                            </th>
                                            <th style="text-align:center;vertical-align:middle; font-size:13px;">
                                                标准物质<br>质量
                                                g
                                            </th>
                                            <th style="text-align:center;vertical-align:middle; font-size:13px;">
                                                水分含量<br>
                                                %
                                            </th>
                                            <th style="text-align:center;vertical-align:middle; font-size:13px;">
                                                水分含量<br>平均值
                                                %
                                            </th>
                                            <th style="text-align:center;vertical-align:middle; font-size:13px;">
                                                水分含量示值<br>相对误差
                                                %
                                            </th>
                                            <th style="text-align:center;vertical-align:middle; font-size:13px;">
                                                技术要求
                                            </th>
                                        </tr>
                                        <tr>
                                            <td style="text-align:center;vertical-align:middle;"></td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B1"
                                                    type="number" id="B1" style="width:140px; height:25px">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B2"
                                                    type="number" id="B2" style="width:140px; height:25px">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B3"
                                                    type="hidden" id="B3" readonly="readonly">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B9"
                                                    type="hidden" id="B9" readonly="readonly">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B15"
                                                    type="hidden" id="B15" readonly="readonly">
                                            </td>

                                        </tr>
                                        <tr>
                                            <td style="text-align:center;vertical-align:middle">1</td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B1"
                                                    type="number" id="B1" style="width:140px; height:25px">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B2"
                                                    type="number" id="B2" style="width:140px; height:25px">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B3"
                                                    type="number" id="B3" readonly="readonly">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B9"
                                                    type="number" id="B9" readonly="readonly">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B15"
                                                    type="hidden" id="B15" readonly="readonly">
                                            </td>

                                        </tr>
                                        <tr style="border-bottom: 2px solid rgb(51,122,183)">
                                            <td style="text-align:center;vertical-align:middle"></td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B1"
                                                    type="number" id="B1" style="width:140px; height:25px">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B2"
                                                    type="number" id="B2" style="width:140px; height:25px">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B3"
                                                    type="hidden" id="B3" readonly="readonly">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B9"
                                                    type="hidden" id="B9" readonly="readonly">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B15"
                                                    type="hidden" id="B15" readonly="readonly">
                                            </td>

                                        </tr>

                                        <tr>
                                            <td style="text-align:center;vertical-align:middle;"></td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B1"
                                                    type="number" id="B1" style="width:140px; height:25px">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B2"
                                                    type="number" id="B2" style="width:140px; height:25px">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B3"
                                                    type="hidden" id="B3" readonly="readonly">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B9"
                                                    type="hidden" id="B9" readonly="readonly">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B15"
                                                    type="hidden" id="B15" readonly="readonly">
                                            </td>

                                        </tr>
                                        <tr>
                                            <td style="text-align:center;vertical-align:middle">1</td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B1"
                                                    type="number" id="B1" style="width:140px; height:25px">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B2"
                                                    type="number" id="B2" style="width:140px; height:25px">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B3"
                                                    type="number" id="B3" readonly="readonly">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B9"
                                                    type="number" id="B9" readonly="readonly">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B15"
                                                    type="hidden" id="B15" readonly="readonly">
                                            </td>

                                        </tr>
                                        <tr style="border-bottom: 2px solid rgb(51,122,183)">
                                            <td style="text-align:center;vertical-align:middle"></td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B1"
                                                    type="number" id="B1" style="width:140px; height:25px">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B2"
                                                    type="number" id="B2" style="width:140px; height:25px">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B3"
                                                    type="hidden" id="B3" readonly="readonly">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B9"
                                                    type="hidden" id="B9" readonly="readonly">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B15"
                                                    type="hidden" id="B15" readonly="readonly">
                                            </td>

                                        </tr>

                                        <tr>
                                            <td style="text-align:center;vertical-align:middle;"></td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B1"
                                                    type="number" id="B1" style="width:140px; height:25px">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B2"
                                                    type="number" id="B2" style="width:140px; height:25px">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B3"
                                                    type="hidden" id="B3" readonly="readonly">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B9"
                                                    type="hidden" id="B9" readonly="readonly">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B15"
                                                    type="hidden" id="B15" readonly="readonly">
                                            </td>

                                        </tr>
                                        <tr>
                                            <td style="text-align:center;vertical-align:middle">1</td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B1"
                                                    type="number" id="B1" style="width:140px; height:25px">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B2"
                                                    type="number" id="B2" style="width:140px; height:25px">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B3"
                                                    type="number" id="B3" readonly="readonly">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B9"
                                                    type="number" id="B9" readonly="readonly">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B15"
                                                    type="hidden" id="B15" readonly="readonly">
                                            </td>

                                        </tr>
                                        <tr style="border-bottom: 2px solid rgb(51,122,183)">
                                            <td style="text-align:center;vertical-align:middle"></td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B1"
                                                    type="number" id="B1" style="width:140px; height:25px">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B2"
                                                    type="number" id="B2" style="width:140px; height:25px">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B3"
                                                    type="hidden" id="B3" readonly="readonly">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B9"
                                                    type="hidden" id="B9" readonly="readonly">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B15"
                                                    type="hidden" id="B15" readonly="readonly">
                                            </td>

                                        </tr>

                                        <tr>
                                            <td style="text-align:center;vertical-align:middle;"></td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B1"
                                                    type="number" id="B1" style="width:140px; height:25px">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B2"
                                                    type="number" id="B2" style="width:140px; height:25px">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B3"
                                                    type="hidden" id="B3" readonly="readonly">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B9"
                                                    type="hidden" id="B9" readonly="readonly">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B15"
                                                    type="hidden" id="B15" readonly="readonly">
                                            </td>

                                        </tr>
                                        <tr>
                                            <td style="text-align:center;vertical-align:middle">1</td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B1"
                                                    type="number" id="B1" style="width:140px; height:25px">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B2"
                                                    type="number" id="B2" style="width:140px; height:25px">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B3"
                                                    type="number" id="B3" readonly="readonly">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B9"
                                                    type="number" id="B9" readonly="readonly">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B15"
                                                    type="hidden" id="B15" readonly="readonly">
                                            </td>

                                        </tr>
                                        <tr>
                                            <td style="text-align:center;vertical-align:middle"></td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B1"
                                                    type="number" id="B1" style="width:140px; height:25px">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle;"><input name="B2"
                                                    type="number" id="B2" style="width:140px; height:25px">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B3"
                                                    type="hidden" id="B3" readonly="readonly">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B9"
                                                    type="hidden" id="B9" readonly="readonly">
                                            </td>
                                            <td style="text-align:center;vertical-align:middle"><input name="B15"
                                                    type="hidden" id="B15" readonly="readonly">
                                            </td>

                                        </tr>


                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="panel panel-primary">
                    <div class="panel-heading">3.水分含量重复性校准</div>
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-md-12">
                                <table class="table">
                                    <tbody>

                                        <tr>
                                            <th style="text-align:center;vertical-align:middle">含水量<br> mg</th>
                                            <th style="text-align:center;vertical-align:middle">标准物质<br>质量 g</th>
                                            <th style="text-align:center;vertical-align:middle">水分含量<br> %</th>
                                            <th style="text-align:center;vertical-align:middle">水分含量<br>平均值 %
                                            </th>
                                            <th style="text-align:center;vertical-align:middle">相对标准偏差%</th>
                                            <th style="text-align:center;vertical-align:middle">技术要求</th>
                                        </tr>
                                        <tr>
                                            <td rowspan="6" style="text-align:center;vertical-align:middle">5</td>
                                            <td><input name="C1" type="text" id="C1" style="width:140px; height:25px">
                                            </td>
                                            <td><input name="C2" type="text" id="C2" onkeyup="Wonkeyup(this)"
                                                    onchange="SetDigitalInputC(2);" style="width:140px; height:25px">
                                            </td>
                                            <td rowspan="6" style="text-align:center;vertical-align:middle">

                                                <input name="C3" type="hidden" id="C3" readonly="readonly"
                                                    style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                <input name="C9" type="hidden" id="C9" readonly="readonly"
                                                    style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                <input name="C15" type="hidden" id="C15" readonly="readonly"
                                                    style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                <input name="C21" type="text" id="C21" readonly="readonly"
                                                    style="width:140px; height:55px;border-width: 0px; border-style: inset;font-size:18px; text-align:center">
                                                <input name="C27" type="hidden" id="C27" readonly="readonly"
                                                    style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                <input name="C33" type="hidden" id="C33" readonly="readonly"
                                                    style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">

                                            </td>
                                            <td rowspan="6" style="text-align:center;vertical-align:middle">
                                                <input name="C4" type="hidden" id="C4" readonly="readonly"
                                                    style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                <input name="C10" type="hidden" id="C10" readonly="readonly"
                                                    style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                <input name="C16" type="text" id="C16" readonly="readonly"
                                                    style="width:140px; height:55px;border-width: 0px; border-style: inset;font-size:18px; text-align:center">
                                                <input name="C22" type="hidden" id="C22" readonly="readonly"
                                                    style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                <input name="C28" type="hidden" id="C28" readonly="readonly"
                                                    style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                <input name="C34" type="hidden" id="C34" readonly="readonly"
                                                    style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">


                                            </td>
                                            <td rowspan="6" style="text-align:center;vertical-align:middle">
                                                <input name="C5" type="hidden" id="C5" readonly="readonly" value="≤ 3 %"
                                                    style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                <input name="C11" type="hidden" id="C11" readonly="readonly"
                                                    value="≤ 3 %"
                                                    style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                <input name="C17" type="hidden" id="C17" readonly="readonly"
                                                    value="≤ 3 %"
                                                    style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                <input name="C23" type="text" id="C23" readonly="readonly" value="≤ 3 %"
                                                    style="width:140px; height:55px;border-width: 0px; border-style: inset; font-size:18px; text-align:center">
                                                <input name="C29" type="hidden" id="C29" readonly="readonly"
                                                    value="≤ 3 %"
                                                    style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                <input name="C35" type="hidden" id="C35" readonly="readonly"
                                                    value="≤ 3 %"
                                                    style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">

                                            </td>
                                        </tr>
                                        <tr>

                                            <td><input name="C7" type="text" id="C7" style="width:140px; height:25px">
                                            </td>
                                            <td><input name="C8" type="text" id="C8" onkeyup="Wonkeyup(this)"
                                                    onchange="SetDigitalInputC(8);" style="width:140px; height:25px">
                                            </td>


                                        </tr>
                                        <tr>

                                            <td><input name="C13" type="text" id="C13" style="width:140px; height:25px">
                                            </td>
                                            <td><input name="C14" type="text" id="C14" onkeyup="Wonkeyup(this)"
                                                    onchange="SetDigitalInputC(14);" style="width:140px; height:25px">
                                            </td>


                                        </tr>
                                        <tr>

                                            <td><input name="C19" type="text" id="C19" style="width:140px; height:25px">
                                            </td>
                                            <td><input name="C20" type="text" id="C20" onkeyup="Wonkeyup(this)"
                                                    onchange="SetDigitalInputC(20);" style="width:140px; height:25px">
                                            </td>


                                        </tr>
                                        <tr>

                                            <td><input name="C25" type="text" id="C25" style="width:140px; height:25px">
                                            </td>
                                            <td><input name="C26" type="text" id="C26" onkeyup="Wonkeyup(this)"
                                                    onchange="SetDigitalInputC(26);" style="width:140px; height:25px">
                                            </td>


                                        </tr>
                                        <tr>

                                            <td><input name="C31" type="text" id="C31" style="width:140px; height:25px">
                                            </td>
                                            <td><input name="C32" type="text" id="C32" onkeyup="Wonkeyup(this)"
                                                    style="width:140px; height:25px" onchange="SetDigitalInputC(32);">
                                            </td>


                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="panel panel-primary">
                    <div class="panel-heading">本次校准结果的扩展不确定度 (<i>k</i>=2)</div>
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="table-responsive">
                                    <table class="table">
                                        <tbody>

                                            <tr>
                                                <th style="text-align:left;border: 0px solid #20369B; height:20px">
                                                    示值误差 <i>Urel</i>
                                                </th>
                                                <td style="text-align:left;border: 0px solid #20369B;height:20px"> =
                                                    <input name="K1" type="text" id="K1" value="1.4%"
                                                        style="width:60px; height:20px">
                                                </td>
                                                <th style="text-align:right;border: 0px solid #20369B;height:20px"></th>
                                                <td style="text-align:left;border: 0px solid #20369B;height:20px"><input
                                                        name="K2" type="hidden" id="K2" value="2"
                                                        style="width:60px; height:20px"></td>

                                            </tr>


                                        </tbody>
                                    </table>
                                </div>
                                <div class="table-responsive">
                                    <table class="table table-bordered">

                                        <tbody>
                                            <tr>
                                                <th>校准员：</th>
                                                <td><input name="calibrator" type="text" id="calibrator"
                                                        style="width:110px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3"
                                                        value="刘宁强"></td>
                                                <th>核验员</th>
                                                <td><input name="inspector_Users" type="text" id="inspector_Users"
                                                        style="width:110px; height:25px"></td>
                                            </tr>
                                        </tbody>
                                    </table>
                                    <div class="S001">
                                        <table>
                                            <tbody>
                                                <tr>
                                                    <td colspan="5" align="center">
                                                        <input type="submit" name="Button2" value="提交校准" id="Button2"
                                                            style="width:80px;">
                                                    </td>

                                                </tr>

                                                <tr>
                                                    <td colspan="5" align="center">
                                                        <input type="submit" name="Button3" value="取     消"
                                                            class="fixed button container" id="Button3"
                                                            style="width:80px;">
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>
{% endblock %}

{% block js %}

<script>
    $(function () {
        $('#tools tr:gt(0)').each(function () {
            $(this).find('td:eq(1) select').change(function () {
                var selectedValue = $(this).val();
                var title = $(this).parent().siblings().eq(0).find('input').first()
                var range = $(this).parent().siblings().eq(1).find('input').first()
                var certificate_number = $(this).parent().siblings().eq(2).find('input').first()
                var end_date = $(this).parent().siblings().eq(3).find('input').first()
                var cal_jigou = $(this).parent().siblings().eq(4).find('input').first()
                var property = $(this).parent().siblings().eq(5).find('input').first()

                $.ajax({
                    type: "GET",
                    url: "/tools/",  // 替换为您的URL
                    dataType: 'JSON',
                    data: {
                        'value': selectedValue,
                    },
                    success: function (data) {
                        // 假设返回的数据填充到input
                        var n = data.datalist;
                        title.val(n[0].fields.title);
                        range.val(n[0].fields.range);
                        certificate_number.val(n[0].fields.certificate_number);
                        end_date.val(n[0].fields.end_date);
                        cal_jigou.val(n[0].fields.cal_jigou);
                        property.val(n[0].fields.property);
                    }
                });
            });

        });
    })


</script>


{% endblock %}